Monadic encapsulation of effects: a revised approach (extended version)
نویسندگان
چکیده
Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of Hindley-Milner’s type system. Our first contribution is to propose a more natural encapsulation construct exploiting higher-order kinds, which achieves the same encapsulation effect, but avoids the ad hoc type parameter of the original proposal. The second contribution is a type safety result for encapsulation of strict state using both the original encapsulation construct and the newly introduced one. We establish this result in a more expressive context than the original proposal, namely in the context of the higher-order lambda-calculus. The third contribution is a type safety result for encapsulation of lazy state in the higher-order lambda-calculus. This result resolves an outstanding open problem on which previous proof attempts failed. In all cases, we formalize the intended implementations as simple big-step operational semantics on untyped terms, which capture interesting implementation details not captured by the reduction semantics proposed previously.
منابع مشابه
Monadic Encapsulation of E ects : A Revised Approach ( Extended
Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modiication of Hindley-Milner's type system. Our rst contribution is to propose a more natural encapsulation construct exploiting higher-order kinds, which achieves the same encapsulation eeect, but avoids the a...
متن کاملMonadic Encapsulation of Effects: a Revised Approach
Launchbury and Peyton-Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of Hindley-Milner’s type system. Our first contribution is to propose a more natural encapsulation construct exploiting higher-order kinds, which achieves the same encapsulation effect, but avoids t...
متن کاملAchieving information flow security through monadic control of effects
This paper advocates a novel approach to the construction of secure software: controlling information flow and maintaining integrity via monadic encapsulation of effects. This approach is constructive, relying on properties of monads and monad transformers to build, verify, and extend secure software systems. We illustrate this approach by construction of abstract operating systems called separ...
متن کاملA Coinductive Calculus for Asynchronous Side-Effecting Processes
We present an abstract framework for concurrent processes in which atomic steps have generic side effects, handled according to the principle of monadic encapsulation of effects. Processes in this framework are potentially infinite resumptions, modelled using final coalgebras over the monadic base. As a calculus for such processes, we introduce a concurrent extension of Moggi’s monadic metalang...
متن کاملTowards a Mathematical Concept of a Component and Its Use Keynote Speech at the Components’ Users Conference CUC’96 Revised and Extended Version
We deal with the concept of a component considered as a black box that is a physical encapsulation of related services according to a published specification. These services can only be accessed through a consistent and published interface that includes an interaction standard. Such a notion of a component needs a carefully chosen semantic concept of a syntactic and a semantic interface that al...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Funct. Program.
دوره 11 شماره
صفحات -
تاریخ انتشار 2001